<template>
	<view class="">
		<view class="header flex-column align-center justify-center">
			<u-avatar :src="src" size="60"></u-avatar>
			<view class="mt-30 name">欢迎来到代理分销</view>
		</view>
		<view class="content">
			<u-form labelPosition="left" labelWidth="80rpx" :model="form" ref="form1" errorType="toast">
				<u-form-item leftIcon="account" :leftIconStyle="{'fontSize':'48rpx'}" label=" " prop="" borderBottom>
					<u-input v-model="form.name" border="none" placeholder="账号"></u-input>
				</u-form-item>
				<view class="mt-30"></view>
				<u-form-item leftIcon="lock" :leftIconStyle="{'fontSize':'48rpx'}" label=" " prop="" borderBottom>
					<u-input v-model="form.name" border="none" placeholder="密码"></u-input>
				</u-form-item>
			</u-form>

			<view class="submit">
				<u-button @click="login" type="primary" color="linear-gradient(-90deg,#5677fc,#5c8dff)" shape="circle" text="登录"></u-button>
				<navigator url="/pages/common/register" class="mt-30 text-center">
					注册
				</navigator>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				src: '',
				text: '无头像',
				form: {
					name: ""
				}
			}
		},
		methods:{
			login() {
				console.log('login');
				uni.switchTab({
					url:'/pages/home/home'
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	.header {
		background: url('/static/img/bg_login.png') no-repeat;
		background-size: 100% 100%;
		height: 400rpx;
	}

	.name {
		color: #fff;
	}

	.content {
		padding: 60rpx;
	}
	.submit {
		margin-top: 90rpx;
	}
</style>